package com.zl.gmadmin.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zl.gmadmin.payload.WorkflowQueryCriteria;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Optional;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: ZhangLiang
 * @Date: 2021/09/04/11:38
 * @Description:
 */
public interface WorkflowService {
    /**
     * 获取流程定义信息
     * @param queryCriteria
     * @param page
     * @return
     */
    Optional<Object> selectPageVo(WorkflowQueryCriteria queryCriteria, Page page);

    /**
     * 根据部署id获取定义资源
     *
     * @param deploymentId
     * @param resourceName
     * @param response
     * @return
     */
    void getProcessResources(String deploymentId, String resourceName, HttpServletResponse response);

    /**
     * 部署添加xml流程
     * @param addXMLRequest
     */
    void addBPMNAndDeployment(WorkflowQueryCriteria addXMLRequest);

    /**
     * 删除流程服务
     * @param ids
     */
    void delBPMNAndDeployment(List<String> ids);

    /**
     * 更新流程
     */
    void updateBPMNAndDeployment();
}
